import request from '@/utils/request';

export const reqUserList = (params)=>request({url:`/system/user/`,method:'get',params});

// 获取用户信息
export const reqUserInfo = (id)=>request({url:`/system/user/${id}/`,method:'get'});
// 添加或者修改用户
export const reqAddOrUpdateUser = (data)=>{

	if(data.id){
		return request({url:`/system/user/${data.id}/`,method:'patch',data})
	}else{
		return request({url:'/system/user/',method:'post',data})
	}
}
// 修改自身密码
export const reqChangePassword = (data)=>{return request({url:'/system/user/password/',method:'patch',data})}

// 重置用户密码
export const reqRepassword=(data)=>request({url:'/system/user/resetPassword/',method:'patch',data});
// 删除用户
export const reqDeleteUser = (id)=>request({url:`/system/user/${id}/`,method:'delete'});


